Skip to content

[3.10] gh-109638: Fix exponential time in csv.Sniffer for doubled quotes (GH-154868) (GH-155113) - #155116

Merged
pablogsal merged 3 commits into
python:3.10from
miss-islington:backport-eaa9bac-3.10
Aug 10, 2026
Merged

pablogsal merged 3 commits into
python:3.10from
miss-islington:backport-eaa9bac-3.10

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

(cherry picked from commit eaa9bac)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
(cherry picked from commit d52184b)

…ed quotes (pythonGH-154868) (pythonGH-155113)

(cherry picked from commit eaa9bac)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit d52184b)
@serhiy-storchaka

Copy link
Copy Markdown
Member

After merging, please create a backport of #155166.

They were added in 3.11.  An unrolled loop is unambiguous at every
position, so it does not backtrack either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka

Copy link
Copy Markdown
Member

The backport of #155166 may be non-trivial (possessive qualifiers only supported since 3.11), so please ping me after merge.

@pablogsal
pablogsal merged commit 19e5024 into python:3.10 Aug 10, 2026
14 of 15 checks passed
@miss-islington
miss-islington deleted the backport-eaa9bac-3.10 branch August 10, 2026 19:53
icanhasmath pushed a commit to ActiveState/cpython that referenced this pull request Oct 28, 2026
…ed quotes (pythonGH-154868) (pythonGH-155113) (python#155116)

* [3.13] pythongh-109638: Fix exponential time in csv.Sniffer for doubled quotes (pythonGH-154868) (pythonGH-155113)
(cherry picked from commit eaa9bac)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit d52184b)

* Match the body of a quoted field without possessive quantifiers

They were added in 3.11.  An unrolled loop is unambiguous at every
position, so it does not backtrack either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit 19e5024)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants